package com.css.dzj.dzjdzqs.modules.updown.entity;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.sql.Date;
import java.util.Objects;

@Entity
@Table(name = "COMM_ATTACHMENT", schema = "DZJDZQS", catalog = "")
public class CommAttachmentEntity {
    private String uuid;
    private String md5Uuid;
    /**
     * 时间戳名字
     */
    private String tableName;
    private String tableKey;
    /**
     *  项目类型id
     */
    private String tableUuid;
    private String serverid;
    private String fileurl;
    private String filename;
    private String filetype;
    private String fileext;
    /* 文件大小 Integer->String */
    private String filesize;
    private String userid;
    private Date uploadtime;
    private Integer ordernum;
    private String category;
    private String extradata;
    private String activityid;
    private String activityname;
    private String attachsecrecylevel;
    private String sijuId;
    private String sijuName;
    @Id
    @Column(name = "UUID")
    @GeneratedValue(generator = "idGenerator")
    @GenericGenerator(name = "idGenerator", strategy = "com.css.dzj.dzjdzqs.common.util.SnowflakeId")
    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    @Basic
    @Column(name = "MD5_UUID")
    public String getMd5Uuid() {
        return md5Uuid;
    }

    public void setMd5Uuid(String md5Uuid) {
        this.md5Uuid = md5Uuid;
    }

    @Basic
    @Column(name = "TABLE_NAME")
    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    @Basic
    @Column(name = "TABLE_KEY")
    public String getTableKey() {
        return tableKey;
    }

    public void setTableKey(String tableKey) {
        this.tableKey = tableKey;
    }

    @Basic
    @Column(name = "TABLE_UUID")
    public String getTableUuid() {
        return tableUuid;
    }

    public void setTableUuid(String tableUuid) {
        this.tableUuid = tableUuid;
    }

    @Basic
    @Column(name = "SERVERID")
    public String getServerid() {
        return serverid;
    }

    public void setServerid(String serverid) {
        this.serverid = serverid;
    }

    @Basic
    @Column(name = "FILEURL")
    public String getFileurl() {
        return fileurl;
    }

    public void setFileurl(String fileurl) {
        this.fileurl = fileurl;
    }

    @Basic
    @Column(name = "FILENAME")
    public String getFilename() {
        return filename;
    }

    public void setFilename(String filename) {
        this.filename = filename;
    }

    @Basic
    @Column(name = "FILETYPE")
    public String getFiletype() {
        return filetype;
    }

    public void setFiletype(String filetype) {
        this.filetype = filetype;
    }

    @Basic
    @Column(name = "FILEEXT")
    public String getFileext() {
        return fileext;
    }

    public void setFileext(String fileext) {
        this.fileext = fileext;
    }

    @Basic
    @Column(name = "FILESIZE")
    public String getFilesize() {
        return filesize;
    }

    public void setFilesize(String filesize) {
        this.filesize = filesize;
    }

    @Basic
    @Column(name = "USERID")
    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    @Basic
    @Column(name = "UPLOADTIME")
    public Date getUploadtime() {
        return uploadtime;
    }

    public void setUploadtime(Date uploadtime) {
        this.uploadtime = uploadtime;
    }

    @Basic
    @Column(name = "ORDERNUM")
    public Integer getOrdernum() {
        return ordernum;
    }

    public void setOrdernum(Integer ordernum) {
        this.ordernum = ordernum;
    }

    @Basic
    @Column(name = "CATEGORY")
    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    @Basic
    @Column(name = "EXTRADATA")
    public String getExtradata() {
        return extradata;
    }

    public void setExtradata(String extradata) {
        this.extradata = extradata;
    }

    @Basic
    @Column(name = "ACTIVITYID")
    public String getActivityid() {
        return activityid;
    }

    public void setActivityid(String activityid) {
        this.activityid = activityid;
    }

    @Basic
    @Column(name = "ACTIVITYNAME")
    public String getActivityname() {
        return activityname;
    }

    public void setActivityname(String activityname) {
        this.activityname = activityname;
    }

    @Basic
    @Column(name = "ATTACHSECRECYLEVEL")
    public String getAttachsecrecylevel() {
        return attachsecrecylevel;
    }

    public void setAttachsecrecylevel(String attachsecrecylevel) {
        this.attachsecrecylevel = attachsecrecylevel;
    }

    @Basic
    @Column(name = "SIJU_ID")
    public String getSijuId() {
        return sijuId;
    }

    public void setSijuId(String sijuId) {
        this.sijuId = sijuId;
    }

    @Basic
    @Column(name = "SIJU_NAME")
    public String getSijuName() {
        return sijuName;
    }

    public void setSijuName(String sijuName) {
        this.sijuName = sijuName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {return true;}
        if (o == null || getClass() != o.getClass()) {return false;}
        CommAttachmentEntity that = (CommAttachmentEntity) o;
        return Objects.equals(uuid, that.uuid) &&
                Objects.equals(md5Uuid, that.md5Uuid) &&
                Objects.equals(tableName, that.tableName) &&
                Objects.equals(tableKey, that.tableKey) &&
                Objects.equals(tableUuid, that.tableUuid) &&
                Objects.equals(serverid, that.serverid) &&
                Objects.equals(fileurl, that.fileurl) &&
                Objects.equals(filename, that.filename) &&
                Objects.equals(filetype, that.filetype) &&
                Objects.equals(fileext, that.fileext) &&
                Objects.equals(filesize, that.filesize) &&
                Objects.equals(userid, that.userid) &&
                Objects.equals(uploadtime, that.uploadtime) &&
                Objects.equals(ordernum, that.ordernum) &&
                Objects.equals(category, that.category) &&
                Objects.equals(extradata, that.extradata) &&
                Objects.equals(activityid, that.activityid) &&
                Objects.equals(activityname, that.activityname) &&
                Objects.equals(attachsecrecylevel, that.attachsecrecylevel) &&
                Objects.equals(sijuId, that.sijuId) &&
                Objects.equals(sijuName, that.sijuName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(uuid, md5Uuid, tableName, tableKey, tableUuid, serverid, fileurl, filename, filetype, fileext, filesize, userid, uploadtime, ordernum, category, extradata, activityid, activityname, attachsecrecylevel, sijuId, sijuName);
    }
}
